package sicnu.cs.ich.api.domain.form;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 分页参数
 *
 * @author 沈洋 邮箱:1845973183@qq.com
 * @create 2021/11/24-20:40
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageParam implements Serializable {
    /**
     * 页码
     */
    protected Integer pageNum = 0;
    /**
     * 每页大小
     */
    protected Integer pageSize = 10;

    protected String key;

    public String getKey() {
        if (key != null && key.length() > 64) {
            key = key.substring(0, 64);
        }
        if (key!=null){
            return key.trim();
        }
        return null;
    }
}
